/*
 * Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the COPYING file.
 */
#include <iostream>
#include "hrCore_mod.hpp"
#include <boost/shared_ptr.hpp>

#include <alcommon/albroker.h>
#include <alcommon/albrokermanager.h>


#ifdef _WIN32
#define ALCALL __declspec(dllexport)
#else
# define ALCALL
#endif

extern "C"
{
    ALCALL int _createModule(boost::shared_ptr<AL::ALBroker> broker){

        AL::ALBrokerManager::setInstance(broker->fBrokerManager.lock());
        AL::ALBrokerManager::getInstance()->addBroker(broker);
        // create module instances
        AL::ALModule::createModule<HRCoreMod>(broker, "HRCore");
        return 0;

    }

    ALCALL int _closeModule(  )
    {
      return 0;
    }

}
